home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / HippoDraw / HippoDrawSrc1.1 / Hippo.subproj / DrawDocument.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-25  |  2.7 KB  |  107 lines

  1. #define DRAWDOCUMENT_H_ID "$Id: DrawDocument.h,v 1.15 1992/03/30 17:04:03 pfkeb Rel $"
  2.  
  3. #import <appkit/Responder.h>
  4. #import <appkit/graphics.h>
  5.  
  6. @interface DrawDocument : Object
  7. {
  8.     id view;            /* the document's GraphicView */
  9.     id window;            /* the window the GraphicView is in */
  10.     id printInfo;        /* the print information for the GraphicView */
  11.     id listener;        /* the icon-dragging listener */
  12.     id hDraw;            /* drawing controler global object */
  13.         
  14.     char *name;            /* the name of the document */
  15.     char *directory;        /* the directory it is in */
  16.     char *iconPathList;        /* list of files last dragged over document */
  17.     BOOL haveSavedDocument;    /* whether document has associated disk file */
  18. }
  19.  
  20. /* Very private instance method needed by factory methods */
  21.  
  22. - (BOOL)loadDocument:(NXStream *)stream frameSize:(NXRect *)frame;
  23.  
  24. /* Factory methods */
  25.  
  26. + new;
  27. + newFromStream:(NXStream *)stream;
  28. + newFromFile:(const char *)file;
  29.  
  30. /* Public methods */
  31. - openTupleFile:(const char *)path;
  32.   /* Opens the tuple file with path path.
  33.    */
  34.  
  35. - free;
  36.  
  37. - loadImageFile:(const char *)file at:(const NXPoint *)p allowAlpha:(BOOL)alphaOk;
  38. - resetScrollers;
  39. - view;
  40. - printInfo;
  41.  
  42. /* Target/Action methods */
  43.  
  44. - changeLayout:sender;
  45. - getPageFrame:(NXRect *)frame;
  46.  /*
  47.   * Returns via argument the size of a page minus margins
  48.   */
  49.  
  50. - changeGrid:sender;
  51. - save:sender;
  52. - saveAs:sender;
  53. - saveTo:sender;
  54. - revertToSaved:sender;
  55. - showTextRuler:sender;
  56. - hideRuler:sender;
  57.  
  58. /* Private method used by saveTo: method */
  59.  
  60. - changeSaveType:sender;
  61.  
  62. /* Document name and file handling methods */
  63.  
  64. - (const char *)filename;
  65. - (const char *)directory;
  66. - (const char *)name;
  67. - setName:(const char *)name andDirectory:(const char *)directory;
  68. - setName:(const char *)name;
  69. - saveTo:(const char *)type using:(SEL)streamWriter;
  70. - save;
  71. - (BOOL)needsSaving;
  72.  
  73. /* Services menu methods */
  74.  
  75. - registerForServicesMenu;
  76. - validRequestorForSendType:(NXAtom)sendType andReturnType:(NXAtom)returnType;
  77. - writeSelectionToPasteboard:pboard types:(NXAtom *)types;
  78.  
  79. /* Window delegate methods */
  80.  
  81. - windowWillClose:sender action:(const char *)action;
  82.  
  83. - windowWillClose:sender;
  84. - windowDidBecomeMain:sender;
  85. - windowWillResize:sender toSize:(NXSize *)size;
  86.  
  87. /* Workspace Manager icon-dragging methods */
  88.  
  89. - registerWindow;
  90. - unregisterWindow;
  91. - (int)iconEntered:(int)windowNum at:(double)x :(double)y
  92.     iconWindow:(int)iconWindowNum iconX:(double)iconX iconY:(double)iconY
  93.     iconWidth:(double)iconWidth iconHeight:(double)iconHeight
  94.     pathList:(char *)pathList;
  95. - (int)iconReleasedAt:(double)x :(double)y ok:(int *)flag;
  96.  
  97. /* Menu command validation method */
  98.  
  99. - (BOOL)validateCommand:menuCell;
  100.  
  101. /* Cursor setting */
  102.  
  103. - resetCursor;
  104.  
  105. @end
  106.  
  107.